package com.hoshiicloud.user.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.user.feign.hystrix.HystrixNeo4jFeignFallback;

import com.hoshiicloud.user.param.rbac.RObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author guangjinwei
 * @create 2019-04-25
 */
@FeignClient(name = "hoshiicloud-neo4j", fallback = HystrixNeo4jFeignFallback.class)
public interface INeo4jService {

    @GetMapping(value = "/neo4j/create/tenant", consumes = "application/json")
    Response createTenant(String tenant);

    @GetMapping(value = "/neo4j/create/organization", consumes = "application/json")
    Response createOrganization(String org);

    @PostMapping(value = "/neo4j/create/platform",consumes = "application/json")
    Response createPlatform(String param);

    @RequestMapping(value = "/neo4j/create/role", method = RequestMethod.POST)
    public Response addRole(RObject param);

    @RequestMapping(value = "/neo4j/create/organization", method = RequestMethod.POST)
    public Response addDept(RObject param);
}
